<?php
if (!defined('IN_WONDERSHARE'))
{
	die('Hacking attempt');
}
class TagModule 
{
   var $db;
 
   function __construct()
   {
   	$this->db = $GLOBALS['db'];
   }
   function get_tag_info($sql,$type = 'list')
   { 
   	$date = array();
	$result = $this->db->query($sql);
    if($type == 'list')
    {
		while($row = $this->db->fetch_array($result))
		{
		  $row['pub_time'] = !empty($row['pub_time'])?date('Y-m-d H:i',$row['pub_time']):'';
		  $date[] = $row;
		}
    }else
    {
        while($row = $this->db->fetch_array($result))
		{
		  $date[] = $row;
		}
    }
	
	return  $date;
   }
   function  change_info($sql)
   {
   	$affect = $this->db->query($sql);
   	return  $affect;
   }
}

?>